//
//  LoginRuleViewController.m
//  Village
//
//  Created by longrise on 2017/10/17.
//  Copyright © 2017年 程虎. All rights reserved.
//

#import "LoginRuleViewController.h"

@interface LoginRuleViewController ()<UIWebViewDelegate>
@property (nonatomic ,strong) UIWebView *web;
@end

@implementation LoginRuleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"注册协议";
    self.view.backgroundColor = [UIColor whiteColor];
    [self addview];
    // Do any additional setup after loading the view.
}
- (void)addview{
    [MBProgressHUD showMessage:@"正在加载..." toView:self.navigationController.view];
    _web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, kDeviceWidth, KDeviceHeight - kNavHeight)];
    _web.delegate = self;
    _web.backgroundColor = [UIColor whiteColor];
    NSURL* url = [NSURL URLWithString:@"http://59.173.241.186:18882/Studio/LEAP/web/applicense.html"];//创建URL
    NSURLRequest* request = [NSURLRequest requestWithURL:url];//创建NSURLRequest
    [_web loadRequest:request];
    [self.view addSubview:_web];
}
-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    [MBProgressHUD hideHUDForView:self.navigationController.view];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
